<?php include("src/viewEnviadaExterna_cs.php");
@session_start();
$_SESSION['varMenu'] = 'Canal 13'; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ver Correspondencia Enviada Externa</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>

<script>J = jQuery.noConflict()</script>


</head>

<body class="style" onload="MM_preloadImages('images/menu3.png','images/menu2.png','images/assignr.png','images/new_taskr.png','images/mailr.png','images/edit_2r.png','images/client_3r.png','images/deleter.png','images/backr.png','images/noter (1).png')">

<div id="container">
  <?php include('header.php');?>
  <div id="mainContent">  
    <?php include('menuTop.php');?>
    <div id="bg">
	 <form name="form" id="form" method="post" action="" enctype="multipart/form-data">
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        
        <tr>
          <td><H1>Ver Correspondencia Enviada Externa</H1></td>
        </tr>
        <tr>
          <td align="center"><table width="80%" border="0" cellpadding="8" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
              <td colspan="2" align="center" valign="top" bgcolor="#400000">&nbsp;</td>
            </tr>
            <tr>
              <td width="75%" align="center" valign="top"><table width="80%" border="0" cellspacing="0" cellpadding="4">
                  <tr>
                    <td width="30%" align="left"><strong>
                      <h2>NUMERO RADICADO:</h2>
                    </strong></td>
                    <td width="70%" align="left">ee<?php echo @$dataCenviadaExterna->cree_radicado;?></td>
                  </tr>
                </table>
                <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>FECHA ENVIO:</h2>
                      </strong></td>
                      <td width="70%" align="left"><?php echo @$dataCenviadaExterna->cree_fecha;?></td>
                    </tr>
                  </table>
				   <table width="80%" border="0" cellspacing="0" cellpadding="4">
                  <tr>
                    <td width="30%" align="left"><strong>
                      <h2>HORA DE ENVIO:</h2>
                    </strong></td>
                    <td width="70%" align="left"><?php echo @$dataCenviadaExterna->cree_hora;?></td>
                  </tr>
                </table>
				 <table width="80%" border="0" cellspacing="0" cellpadding="4">
                  <tr>
                    <td width="30%" align="left"><strong>
                      <h2>RECEPCION:</h2>
                    </strong></td>
                    <td width="70%" align="left"><?php echo @$dataCenviadaExterna->cree_recepcion;?></td>
                  </tr>
                </table>
               	 <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left" valign="top"><strong>
                        <h2>OFINICA DESTINO:</h2>
                      </strong></td>
                      <td width="70%" align="left"><?php echo @$cadenaDependencia->dependencia;?></td>
                    </tr>
                  </table>
				  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left" valign="top"><strong>
                        <h2>FECHA DOCUMENTO:</h2>
                      </strong>
                      
                      </td>
                      <td width="70%" align="left"><?php echo @$dataCenviadaExterna->cree_fecha_doc;?></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left" valign="top"><strong>
                        <h2>ANEXOS:</h2>
                      </strong>
                      
                      </td>
                      <td width="70%" align="left"><?php echo @$dataCenviadaExterna->cree_anexos;?></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left" valign="top"><strong>
                        <h2>SERIE-SUBSERIE:</h2>
                      </strong>
                      
                      </td>
                      <td width="70%" align="left"><?php echo @$dataCenviadaExterna->cree_serie;?></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>DOCUMENTO:</h2>
                      </strong></td>
                      <td width="70%" align="left"> <a href="file_upload/documentos/<?php echo @$dataCenviadaExterna->cree_doc_rename;?>" target="_blank" style="text-decoration:none;"
						 title="<?php echo @$dataCenviadaExterna->cree_doc_original;?>">								
						<img src="images/icono_pdf.gif" alt="Ver" width="22" height="23" border="0" /></a></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left" valign="top">&nbsp;</td>
                      <td width="70%" align="left" valign="top">&nbsp;</td>
                    </tr>
					<tr>
					<td colspan="3" align="center">
					<input onClick="javascript:window.history.back();" type="button" name="Submit" value="Volver" /></td> </tr>
                </table></td>
             
            </tr>
            <tr>
              <td colspan="2" align="center" valign="top" bgcolor="#400000"><br /></td>
            </tr>
          </table>
          <br />            <br /></td>
        </tr>
      </table>
	  </form>
    </div>
    <br />
    <br />
    <!-- end #mainContent -->
  </div>
  <?php include('footer.php');?>
<!-- end #container --></div>

</body>
</html>
<script language="javascript" type="text/javascript">

idMember 	= new Array ();
idcharge 	= new Array ();

 i = 0;

 function addMember()
 {
 	
 	member 	 = document.getElementById('name_member').value;
	charge 	 = document.getElementById('charge').value;
	
	
	
	if(member!=''&& charge!='')
	{
		var arreglo = '';
		
			idMember[i] 		= member;
			idcharge[i]		 	= charge;
			
			i++;
		for (j=0;j<idMember.length;j++)
		{
			arreglo = arreglo+'<tr><td>&nbsp;</td><td>'+idMember[j]+'</td><td>&nbsp;</td><td>'+idcharge[j]+'</td><td colspan="4">&nbsp;</td><td width="12"><a href="#" onclick="quitarProducto(\''+idMember[j]+'\');return false;"><img width="15" height="15" border="0" src="../images/delet.png"/></td></tr>';
		} 
		
		document.getElementById('divmenber').innerHTML = '<table width="100%" border="0">'+arreglo+'</table>';
	}
	else
	{
		alert('los datos Integrante y cargo estan vacios.');
		return false;
	}
 }

 
function quitarProducto(indice)
{
		
	idAux = new Array ();
	canAux = new Array ();
	valAux = new Array ();
	depreAux= new Array ();
	
	var arreglo = '';
	
	var k = 0;
	for (j=0;j<idMember.length;j++)
	{
		if(idMember[j] != indice)
		{
			idAux[k]  = idMember[j];
			canAux[k] = idcharge[j];
			
			k++;
    		arreglo = arreglo+'<tr><td>'+idMember[j]+'</td><td>&nbsp;</td><td>'+idcharge[j]+'</td><td colspan="4">&nbsp;</td><td width="12"><a href="#" onclick="quitarProducto(\''+idMember[j]+'\');return false;"><img width="10" height="10" border="0" src="images/delete.png"/></td></tr>';
		}
		
	} 
	
	idMember 	= idAux;
	idcharge 	= canAux;
	
	i--;
	document.getElementById('divmenber').innerHTML = '<table width="50%" border="0">'+arreglo+'</table>';
}

 
	function validate()
{
	f = window.document.form;
  
	var msj = '';
			

	
	if(msj != '')
	{
		alert(msj);
		return false;
	}
	else
	{
		var arregloHiddenMember   = ''
		var arregloHiddenCharge   = ''
				
		for (j=0;j<idMember.length;j++)
		{
			if(j==0)
			{
				arregloHiddenMember   = idMember[j];
				arregloHiddenCharge   = idcharge[j];
				
			}
			else
			{
				arregloHiddenMember   = arregloHiddenMember+','+idMember[j];
				arregloHiddenCharge   = arregloHiddenCharge+','+idcharge[j];
		
				
			}
		} 
		document.getElementById('members').value  = arregloHiddenMember;
		document.getElementById('charges').value  = arregloHiddenCharge;
	
		f.submit();		
		return true;
	}
		
}
</script>